
// 构造函数涉及的性能问题


// let arr = {}
//
// let kk = [{
//     name:'ddd',
//     id:'1'
// },{
//     name:'ddd',
//     id:'2'
// },{
//     name:'ddd',
//     id:'3'
// }]
//
// kk.forEach(({id,name})=> arr[id] = name);
// console.log(arr)
//
// let ks = {}
// kk.forEach(({id, name}, item) => {
//     ks[id] = {
//         name:name,
//         id:id,
//     }
// })
//
// console.log(ks)


let k1 = [
    {
        "user_id": "734787b2-f398-4d9b-8554-f0292ebbe99f",
        "user_name": "1WXBxiehuaye",
        "user_chinese_name": "谢化业",
        "card_list": [
            {
                "card_no": "1312495488",
                "card_status": 1
            }
        ],
        "tag_list": [
            {
                "tag_id": "sz_jd_wy_zy_szssynkylgc_hjb",
                "tag_name": "深圳/金地威新大厦/物业/卓越/深圳市深业农科园林工程有限公司/环境部",
                "tag_show_name": "深圳/金地威新大厦/物业/卓越/深圳市深业农科园林工程有限公司/环境部"
            }
        ]
    },
    {
        "user_id": "d63a1416-38f8-4ffb-8738-495645cc0259",
        "user_name": "1WXBzhengjunyu",
        "user_chinese_name": "郑君宇",
        "card_list": [
            {
                "card_no": "3804711946",
                "card_status": 1
            }
        ],
        "tag_list": [
            {
                "tag_id": "sz_jdwx_wy_zy_szzywy_agb",
                "tag_name": "深圳/金地威新大厦/物业/卓越/深圳市卓越物业管理有限责任公司/安管部",
                "tag_show_name": "深圳/金地威新大厦/物业/卓越/深圳市卓越物业管理有限责任公司/安管部"
            }
        ]
    },
    {
        "user_id": "e42f357f-18cd-4fba-a737-7d458445e0ef",
        "user_name": "1LKwuaolong",
        "user_chinese_name": "吴傲龙",
        "card_list": [
            {
                "card_no": "3441167025",
                "card_status": 1
            }
        ],
        "tag_list": [
            {
                "tag_id": "sz_jdwx_wy_zy_szzywy_agb",
                "tag_name": "深圳/金地威新大厦/物业/卓越/深圳市卓越物业管理有限责任公司/安管部",
                "tag_show_name": "深圳/金地威新大厦/物业/卓越/深圳市卓越物业管理有限责任公司/安管部"
            }
        ]
    },
    {
        "user_id": "fe285717-e711-4874-806b-60ef754fcb0d",
        "user_name": "1WXBtangyueming",
        "user_chinese_name": "唐跃明",
        "card_list": [
            {
                "card_no": "3805154570",
                "card_status": 1
            }
        ],
        "tag_list": [
            {
                "tag_id": "sz_jd_wy_zy_szhytzhcsyyjt_hjb",
                "tag_name": "深圳/金地威新大厦/物业/卓越/深圳玉禾田智慧城市运营集团有限公司/环境部",
                "tag_show_name": "深圳/金地威新大厦/物业/卓越/深圳玉禾田智慧城市运营集团有限公司/环境部"
            }
        ]
    }
]

let dd = {
    "user_list": [
        {
            "user_id": "67847107-3380-4f96-950e-3e9a287b3084",
            "user_name": "1WXBtestfanmin",
            "user_chinese_name": "范铭",
            "card_list": [
                {
                    "card_no": "1181696560",
                    "card_status": 1
                },
                {
                    "card_no": "1961214352",
                    "card_status": 6
                },
                {
                    "card_no": "1181854208",
                    "card_status": 6
                },
                {
                    "card_no": "1181815424",
                    "card_status": 6
                }
            ],
            "tag_list": [
                {
                    "tag_id": "sz_jdwx_wy_zy_szzywy_zhb",
                    "tag_name": "深圳/金地威新大厦/物业/卓越/深圳市卓越物业管理有限责任公司/综合部",
                    "tag_show_name": "深圳/金地威新大厦/物业/卓越/深圳市卓越物业管理有限责任公司/综合部"
                }
            ]
        }
    ]
}

let k2 = {}

k1.forEach(({user_id,user_name,user_chinese_name,card_list,tag_list}) => {
    k2[user_id] = {
        user_id:user_id,
        user_name:user_name,
        user_chinese_name:user_chinese_name,
        card_list:card_list,
        tag_list:tag_list,
    }
})

console.log(k2)
